{include file="public/header"}
<head>
    <meta charset="utf-8">
    <title>任务详情</title>
    <link rel="stylesheet" type="text/css" href="__CSS__/tt.css" />
    <style media="screen">
        html body {
            margin: 0;
            background-color: #EEEEEE;
            width: 100%;
            height: 100%;
            font-size: 14px;
            color: #333333;
            font-weight: 500;
        }
        .flex-wrap{ display: -webkit-box;	display:box;display: -webkit-flex;	display: flex; }
        .flex-con{  -webkit-box-flex: 1;     -webkit-flex: 1;    flex: 1;font-weight:400;}
        .flex-vertical{  -webkit-box-horizontal: vertical;-webkit-flex-flow: column; flex-flow: column;}

        .color333 {
            font-size: 14px;
            color: #333; font-weight: normal;
        }

        .color {

        }

        .content {
            width: 1200px;
            margin: 30px auto;
            background-color: #fff;
            border-radius: 3px;
        }

        .base {
            width: 100%;
            height: 42px;
            line-height: 42px;
            text-align: center;
        }

        .base>div:first-child {
            float: left;
            width: 92px;
            height: 42px;
            border-top: 3px solid #0065F0;
            border-right: 1px solid #F4F4F4;
            box-sizing: border-box;
            position: relative;
            line-height: 40px;
            border-radius: 3px;
        }

        .base>div:nth-child(2) {
            float: right;
            width: 1108px;
            height: 42px;
            text-align: left;
            box-sizing: border-box;
            border-bottom: 1px solid #F4F4F4;

        }

        .ling {
            width: 92px;
            height: 100%;
            text-align: center;
            font-size: 14px;
            color: #999999;
            font-weight: normal;
            line-height: 40px;
            border-top: 3px solid #fff;
            box-sizing: border-box;
        }

        .info{
            height: 100%;
            margin-left:125px;
            margin-top: 57px;
        }
        .item{
            margin-bottom: 10px;
        }
        .item_left{
            width: 138px;

        }
        .img1{
            width: 100px;
            height: 100px;
            border-radius: 4px;
        }
        .color>div{
            width: 520px;
            border-radius: 3px;
            border: 1px solid #ccc;
            padding: 20px;
            font-size: 14px;
            color: #999;
            font-weight: normal;
        }
        .jianjie{
            margin-top: 16px;
        }

        .wrap1 {
            width: 100%;
            background: #3F3F3F;
            height: 30px;
            line-height: 30px;
        }

        .wrap1 .content1 {
            margin: 0 auto;
            width: 1200px;
            font-size: 12px;
            color: #ffffff;
            /*position: relative;*/
            display: flex;
        }

        .kong {
            flex: 1;
        }

        .content12 {
            position: relative;
        }

        .redhot {
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: #BA0000;
            position: absolute;
            left: 24px;
            top: 5px;
        }

        .wrap2 {
            line-height: 60px;
            width: 100%;
            height: 60px;
            background: #ffffff;
        }

        .content2 {
            margin: auto;
            width: 1200px;
            display: flex;
        }

        .content2_left {
            width: 190px;
            font-size: 18px;
            color: #333333;
        }

        .content2_left span {
            display: inline-block;
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background: #0065F0;
            vertical-align: middle;
            margin-right: 11px;
        }

        .content_middle {
            flex: 1;
            text-align: left;
            display: flex;
        }

        .content_right {
            font-size: 16px;
        }

        .content_right img {
            display: inline-block;
            width: 36px;
            height: 36px;
            border-radius: 50%;
            margin-right: 20px;
            vertical-align: middle;
        }

        .content_middle .item {
            width: 152px;
        }

        .content_middle .item.active2 {
            color: #0065F0;
        }

        .wrap3 {
            line-height: 60px;
            width: 100%;
            height: 60px;
            background: #0065F0;
        }

        .content3 {
            margin: auto;
            width: 1200px;
            display: flex;
        }

        .content3-left {
            line-height: 60px;
            color: #ffffff;
            font-size: 16px;
        }
        .wrap4{
            background: #ffffff;
            margin: 30px auto 80px;
            width: 1200px;
            padding: 52px 0 0 128px;
            box-sizing: border-box;
            font-size:14px;
            font-family:PingFangSC-Medium;
            font-weight:500 !important;
            color:rgba(51,51,51,1);
            line-height:20px;
        }
        .mar_bom{
            margin-bottom: 10px;
        }
        .text1{
            width: 70px;
            margin-right: 68px;
            height: 20px;
            font-weight: 500;
            text-align: right;
        }
        .tupain{
            max-width:500px;
            /*height:100px;*/
            border-radius:4px;
        }
        .radio1{
            margin-right: 50px;
        }
        .radio1 .span1{
            margin-right: 11px;
            border-bottom: 2px solid #ffffff;
        }
        .radio1 .span1 img{
            margin-top: 4px;
            width: 14px;
            height: 14px;
            display: inline-block;
        }
        .uncheck{
            width:14px;
            height:14px;
            background:rgba(255,255,255,1);
            border:1px solid rgba(217,217,217,1);
            margin-top: 4px;
            display: inline-block;
            border-radius: 50%;

        }
        .galv{
            line-height: 20px;
        }
        .reasion{
            width:520px;
            height:150px;
            background:rgba(255,255,255,1);
            border-radius:3px;
            border:1px solid rgba(204,204,204,1);
            padding: 20px;
            box-sizing: border-box;
            resize:none;
            outline: none;
            color: #333333;
        }
        .btn_wrap{
            padding-left: 138px;
            margin-top: 40px;
            padding-bottom: 198px;
        }
        .btn{
            width:130px;
            height:34px;
            background:rgba(0,101,240,1);
            border-radius:3px;
            font-size:12px;
            font-family:PingFangSC-Regular;
            font-weight:400;
            color:rgba(255,255,255,1);
            line-height:34px;
            text-align: center;
            margin-right: 35px;
            cursor: pointer;
        }
        .btn2{
            color: #333333;
            background:#f7f7f7;
        }
        label{
            display:inline-block;
            /*        width:61px;
            */        height:20px;
            line-height:20px;
            text-align:left;
            position: relative;
            margin-right: 49px;
        }
        label input{
            width: 14px;
            height: 14px;
            vertical-align: bottom;
            margin-right:11px;
            opacity: 0;
        }
        .spot{
            display:inline-block;

            position: absolute;
            top:2px;
            left:0;
            z-index:5;
            width:14px;
            border-radius: 50%;
            height:14px;
            background:rgba(255,255,255,1);
            border:1px solid rgba(217,217,217,1);
        }
        input:checked + .spot{
            background:url("__IMG__/radio.png") no-repeat;  /*选中后的样式图片*/
            background-size:14px;
            border:0px solid rgba(217,217,217,1);

        }

        textarea::-moz-placeholder{
            color: #CCCCCC;
        }
        textarea::-webkit-input-placeholder{
            color: #CCCCCC;

        }
        textarea::-ms-input-placeholder{
            color: #CCCCCC;
        }
        .reasion{
            width:520px;
            height:150px;
            background:rgba(255,255,255,1);
            border-radius:3px;
            border:1px solid rgba(204,204,204,1);
            padding: 20px;
            box-sizing: border-box;
            resize:none;
            outline: none;
            color: #333333;
        }
    </style>
    <style>
        .hidden{
            display: none;
        }
        .ovfHiden{overflow: hidden;height: 100%;}
    </style>
</head>

<body>
<a name="miao"></a>

<div class="wrap3">
    <div class="content3">
        <div class="content3-left">
            审核管理 > 详情
        </div>
    </div>
</div>
<div class="wrap4">
    <div class="mar_bom flex-wrap">
        <div class="text1">
            任务编号：
        </div>
        <div class="flex-con">
            {$data.tu_number}
        </div>
    </div>
    <div class="mar_bom flex-wrap">
        <div class="text1">
            任务类别：
        </div>
        <div class="flex-con">
            {$tasktypes[$data.task_type]}
        </div>
    </div>
    <div class="mar_bom flex-wrap">
        <div class="text1">
            任务名称：

        </div>
        <div class="flex-con">
            {$data.task_name}

        </div>
    </div>
    <div class="mar_bom flex-wrap">
        <div class="text1">
            任务类型：

        </div>
        <div class="flex-con">
            {if $data.tu_task_active == 1}普通任务{else /}活动任务{/if}

        </div>
    </div>
    <div class="mar_bom flex-wrap">
        <div class="text1">
            领取用户：

        </div>
        <div class="flex-con">
            {$data.user_username}

        </div>
    </div>
    <!---->
    {if $data.task_type == 6}
    <div class="mar_bom flex-wrap">
        <div class="text1">
            分享类型：
        </div>
        <div class="flex-con">
            {if $data.task_share_type == 1}曝光率{else /}到达率{/if}
        </div>
    </div>
    {if $data.task_share_type == 1}
    <div class="mar_bom flex-wrap">
        <div class="text1">
            完成进度：
        </div>
        <div class="flex-con">
            {$data.tu_share_b_num}/{$data.task_share_b_num}
        </div>
    </div>
    <div class="mar_bom flex-wrap">
        <div class="text1">
            分享渠道：

        </div>
        <div class="flex-con">
            {in name="1" value="$data.task_share_qudao"}微信{/in}
            {in name="2" value="$data.task_share_qudao"} 朋友圈{/in}
            {in name="3" value="$data.task_share_qudao"} QQ{/in}
            {in name="4" value="$data.task_share_qudao"} 微博{/in}
        </div>
    </div>
    {else /}
        {if $data.task_share_d_fen == 2}
        <div class="mar_bom flex-wrap">
            <div class="text1">
                完成进度：
            </div>
            <div class="flex-con">
                {$data.tu_share_fen}/{$alls}
            </div>
        </div>
        <div class="mar_bom flex-wrap">
            <div class="text1">
                分享渠道：
            </div>
            <div class="flex-con">
                {in name="1" value="$son.tf_qudao"}微信{/in}
                {in name="2" value="$son.tf_qudao"} 朋友圈{/in}
                {in name="3" value="$son.tf_qudao"} QQ{/in}
                {in name="4" value="$son.tf_qudao"} 微博{/in}
            </div>
        </div>
        {else /}
        <div class="mar_bom flex-wrap">
            <div class="text1">
                分享渠道：

            </div>
            <div class="flex-con">
                {in name="1" value="$data.task_share_qudao"}微信{/in}
                {in name="2" value="$data.task_share_qudao"} 朋友圈{/in}
                {in name="3" value="$data.task_share_qudao"} QQ{/in}
                {in name="4" value="$data.task_share_qudao"} 微博{/in}
            </div>
        </div>
        {/if}
    {/if}

    {/if}
    <!---->
    <div class="mar_bom flex-wrap">
        <div class="text1">
            领取时间：

        </div>
        <div class="flex-con">
            {$data.tu_receive_time}

        </div>
    </div>
    <div class="mar_bom flex-wrap">
        <div class="text1">
            提交时间：


        </div>
        <div class="flex-con">
            {$data.tu_submit_time}
        </div>
    </div>
    <div class="mar_bom flex-wrap">
        <div class="text1">
            上传图片：
        </div>
        <div class="flex-con">
            {if !$data["tu_image"]}无{/if}
            {volist name='$data["tu_image"]' id='img'}
            <img src="{$img}" class="tupain"/>
            {/volist}
        </div>
    </div>
    <div class="mar_bom flex-wrap">
        <div class="text1">
            审核：
        </div>
        {if $data.tu_status == 1}
        <div class="flex-con flex-wrap">
            <label><input type="radio" name="agree" checked value="2" /><i class="spot"></i>同意</label>
            <label><input type="radio" name="agree" value="3" /><i class="spot"></i>拒绝</label>
        </div>
        {else /}
        <div class="flex-con">
            {$types[$data.tu_status]}
        </div>
        {/if}
    </div>
    {if $data.tu_status == 1}
    <div class="mar_bom flex-wrap hidden liyou">
        <div class="text1" style="margin-top: 7px;">
            拒绝理由：

        </div>
        <div class="flex-con">
            <textarea  class="reasion" placeholder="请输入拒绝理由…"></textarea>
        </div>
    </div>
    {/if}
    <div class="btn_wrap flex-wrap">
        {if $data.tu_status == 1}
        <div class="btn baocun">
            保存
        </div>
        {/if}
        <div class="btn btn2" onclick="history.go(-1)">
            取消
        </div>

    </div>
</div>
<div class="all_div" style="display:none;width: 100%;height: 100%;background-color: gray;position: absolute;z-index: 9999;background: rgba(0,0,0,0.5);top: 0;left: 0;padding: 0;margin: 0;text-align: center;padding-top: 100px">
    <img class="img_big" src="" style="max-height: 1000px" />
</div>

<!--防止重复提交-->
<input type="hidden" name="repeatSubmit" id="repeatSubmit" value="1" />
<input type="hidden" name="tu_id" id="tu_id" value="{$data.tu_id}" />
<a href="#miao" id="gomaodian"></a>
</body>
{include file="public/footer"}
<script>
    $('input[name="agree"]').click(function () {
        var ji = $('input[name="agree"]:checked').val();
        //2是同意  3是拒绝
        if(ji == 2){
            $('.liyou').addClass('hidden');
        }else{
            $('.liyou').removeClass('hidden');
        }
    });
    $('.baocun').click(function () {
        var repeatSubmit = $('#repeatSubmit').val();
        if(repeatSubmit == 2){
            alert('请勿重复提交！');
            return false;
        }else{
            var ji = $('input[name="agree"]:checked').val();
            var tu_id = $('#tu_id').val();
            if(ji == 2){
                if(confirm('确定审核通过吗？')){
                    $('#repeatSubmit').val(2);
                    $.ajax({
                        url: '/shop/Check/agree',
                        data: 'tu_id='+tu_id,
                        type: 'POST',
                        dataType: 'JSON',
                        success: function (returnData) {
                            alert(returnData.msg);
                            if(returnData.code == 200){
                                window.location.href = '/shop/Check/checkPage';
                                return true;
                            }
                        },
                        error: function () {
                            alert('服务器错误，请刷新重试！');
                        }
                    })
                }

            }else{
                var remark = $('.reasion').val().trim();
                if(remark){
                    if(confirm('确定审核拒绝吗？')){
                        $('#repeatSubmit').val(2);
                        $.ajax({
                            url: '/shop/Check/refuse',
                            data: 'tu_id='+tu_id+'&reason='+remark,
                            type: 'POST',
                            dataType: 'JSON',
                            success: function (returnData) {
                                alert(returnData.msg);
                                if(returnData.code == 200){
                                    window.location.href = '/shop/Check/checkPage';
                                    return true;
                                }
                            },
                            error: function () {
                                alert('服务器错误，请刷新重试！');
                            }
                        })
                    }
                }else{
                    alert('拒绝原因不能为空');
                    return false;
                }
            }
        }
    });
</script>
<script>
    $('.tupain').click(function () {
        $('#gomaodian').trigger('click');
        var src = $(this).attr('src');
        $('.img_big').attr('src',src);
        $('.all_div').css('display','block');
        $('html,body').addClass('ovfHiden');
    })
    $('.all_div').click(function () {
        $('.all_div').css('display','none');
        $('html,body').removeClass('ovfHiden');
    })
</script>